(()=>{
    console.log('基础类型');

    console.log('布尔');
    let isDone: boolean = false;
    console.log(isDone);
    isDone = true;
    console.log(isDone);

    let a1: number = 10; // 十进制
    let a2: number = 0b1010;  // 二进制
    let a3: number = 0o12; // 八进制
    let a4: number = 0xa; // 十六进制
    console.log(a1,a2,a3,a4);


    let name:string = 'tom';
    console.log(name);
    name = 'jack';
// name = 12 // error
    let age:number = 12;
    const info = `My name is ${name}, I am ${age} years old!`;
    console.log(info);


    let u: undefined = undefined;
    console.log(u);
    let n: null = null;
    console.log(n);

    //todo 需要在tsconfig.json中设置 "strict": false, 
    let u1: number = undefined;
    console.log(u1);
    let u2: number = null;
    console.log(u2);

    //数组语法
    let arr1: number[] = [10, 20, 30];
    console.log(arr1);
    let arr2: Array<number> = [1,2,3];
    console.log(arr2);

    //元组: 定义时限定类型和长度 方便静态代码分析提示代码错误
    let arr3: [string, number, boolean] = ["测试", 100, true]
    console.log(arr3);


})();
